package com.manda.smart.hub.expression.definition;

import cn.hutool.core.util.ReflectUtil;
import lombok.Data;
import lombok.experimental.Accessors;

import java.lang.reflect.Method;

/**
 * @author hongda.li
 */
@Data
@Accessors(chain = true)
public class Invocation {

    private Object target;

    private Class<?> targetType;

    private Method method;

    private Object[] args;

    public Object invoke() {
        return ReflectUtil.invoke(target, method, args);
    }
}
